﻿<%@ page contentType="text/html;charset=UTF-8" language="java"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%
    request.setAttribute("contextPath", request.getContextPath());
%>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>慧驾书城后台管理系统</title>
<meta name="查看port" content="width=device-width, initial-scale=1.0">
<meta name="description" content="">
<meta name="author" content="">

<!-- Bootstrap style -->
<link id="callCss" rel="stylesheet"
	href="${contextPath }/themes/bootshop/bootstrap.min.css" media="screen" />
<link href="${contextPath }/themes/css/base.css" rel="stylesheet"
	media="screen" />
<!-- Bootstrap style responsive -->
<link href="${contextPath }/themes/css/bootstrap-responsive.min.css"
	rel="stylesheet" />
<link href="${contextPath }/themes/css/font-awesome.css"
	rel="stylesheet" type="text/css">
<!-- Google-code-prettify -->
<link href="${contextPath }/themes/js/google-code-prettify/prettify.css"
	rel="stylesheet" />
<!-- fav and touch icons -->
<link rel="shortcut icon" href="themes/images/ico/favicon.ico">
<link rel="apple-touch-icon-precomposed" sizes="144x144"
	href="${contextPath }/themes/images/ico/apple-touch-icon-144-precomposed.png">
<link rel="apple-touch-icon-precomposed" sizes="114x114"
	href="${contextPath }/themes/images/ico/apple-touch-icon-114-precomposed.png">
<link rel="apple-touch-icon-precomposed" sizes="72x72"
	href="${contextPath }/themes/images/ico/apple-touch-icon-72-precomposed.png">
<link rel="apple-touch-icon-precomposed"
	href="${contextPath }/themes/images/ico/apple-touch-icon-57-precomposed.png">
<style type="text/css" id="enject"></style>
</head>



<body>
	<div id="header">
		<div class="container">
			<div id="welcomeLine" class="row">
				<div class="span6">
					<c:if test="${not empty ADMIN_USER_KEY_IN_SESSION }">
						<p>尊敬的 ${adminRoleName} <font color=blue><b>${ADMIN_USER_KEY_IN_SESSION.userName }</b></font> 欢迎您!
						<strong><a href="${contextPath }/admin/adminlogout" />登出</a></strong></p>
					</c:if>

				</div>

			</div>
			
			<!-- Navbar ================================================== -->
			<div id="logoArea" class="navbar">
				<a id="smallScreen" data-target="#topMenu" data-toggle="collapse"
					class="btn btn-navbar"> <span class="icon-bar"></span> <span
					class="icon-bar"></span> <span class="icon-bar"></span>
				</a>
				<div class="navbar-inner">
					<a class="brand" href="${contextPath }/index"><img
						src="${contextPath }/themes/images/logo.png" alt="Bootsshop" /></a>

					<h2>
						<font color=white>慧驾书城后台管理系统 - 订单管理</font>
					</h2>
				</div>
			</div>
			</div>
			</div>
			
			<!-- Header End====================================================================== -->
			<div id="mainBody">
				<div class="container">
					<div class="row">
						<!-- Sidebar ================================================== -->
						<div id="sidebar" class="span3">

							<ul id="sideManu" class="nav nav-tabs nav-stacked">

								<li class="subMenu open"><a> 所有分类</a>
									<ul>
										<li><a href="${contextPath }/admin/order/orderlist/1"><i
												class="icon-chevron-right"></i>待付款</a></li>
										<li><a href="${contextPath }/admin/order/orderlist/2"><i
												class="icon-chevron-right"></i>已付款</a></li>
										<li><a href="${contextPath }/admin/order/orderlist/3"><i
												class="icon-chevron-right"></i>配货中</a></li>
										<li><a href="${contextPath }/admin/order/orderlist/4"><i
												class="icon-chevron-right"></i>待发货</a></li>
										<li><a href="${contextPath }/admin/order/orderlist/5"><i
												class="icon-chevron-right"></i>已发货</a></li>
										<li><a href="${contextPath }/admin/order/orderlist/6"><i
												class="icon-chevron-right"></i>已收货</a></li>
										<li><a href="${contextPath }/admin/order/orderlist/7"><i
												class="icon-chevron-right active"></i>已取消</a></li>
									</ul></li>




							</ul>
							<br />


						</div>
						<!-- Sidebar end=============================================== -->
						<div class="span9">


	<c:choose>
												<c:when test="${page == 0}">
								<ul class="breadcrumb">
									<li><a href="${contextPath }/admin">主页</a> <span class="divider">/</span></li>
									<li><a class="active" >订单管理</a>
								</ul>
								
				

												</c:when>

												<c:otherwise>
									<ul class="breadcrumb">
									<li><a href="${contextPath }/admin/order/orderlist">主页</a> <span class="divider">/</span></li>
									<li><a class="active" >
													<c:if test="${page==1}">
														待付款
													</c:if>
													<c:if test="${page==2}">
														已付款
													</c:if>

													<c:if test="${page==3}">
														配货中
													</c:if>
													<c:if test="${page==4}">
														待发货
													</c:if>
													<c:if test="${page==5}">
														已发货
													</c:if>

													<c:if test="${page==6}">
														已收货
													</c:if>

													<c:if test="${page==7}">
														已取消
													</c:if>
									
									</a></li>

								</ul>
												</c:otherwise>
											</c:choose>
											
							

								<div class="well well-small">



									<br />
									<table class="table table-striped">
										<thead>
											<tr>
												<th>#</th>
												<th>订单单号</th>
												<th>图书名</th>
												<th>订单人</th>
												<th>数量</th>
												<th>总价</th>
												<th>订单状态</th>
												<th>操作</th>
											</tr>
										</thead>
										<tbody>

											<c:forEach items="${orders }" var="o">

												<tr>
													<td>${o.singleOrderId }</td>
													<td>${o.referenceNumber }</td>
													<td>${o.bookName}</td>
													<td>${o.userName}</td>
													<td>${o.quantity}</td>
													<td>￥${o.totalPrice}</td>
													<c:if test="${o.orderStatus==1}">
														<td>待付款</td>
													</c:if>
													<c:if test="${o.orderStatus==2}">
														<td>已付款</td>
													</c:if>

													<c:if test="${o.orderStatus==3}">
														<td>配货中</td>
													</c:if>
												<c:if test="${o.orderStatus==4}">
														<td>待发货</td>
													</c:if>
													<c:if test="${o.orderStatus==5}">
														<td>已发货</td>
													</c:if>

													<c:if test="${o.orderStatus==6}">
														<td>已收货</td>
													</c:if>

													<c:if test="${o.orderStatus==7}">
														<td>已取消</td>
													</c:if>
													<td><a href="${contextPath }/admin/order/orderlist/orderdetail/${o.singleOrderId}"><font color=red>查看详情</font></a></td>
												</tr>
											</c:forEach>
										</tbody>
									</table>
								</div>
						</div>
					</div>
				</div>
			</div>
		
		
			<!-- Footer ================================================================== -->
			<div id="footerSection">
				<div class="container">

					<p class="pull-right">&copy; 慧驾书城</p>
				</div>
				<!-- Container End -->
			</div>
			<!-- Placed at the end of the document so the pages load faster ============================================= -->
			<script src="${contextPath }/themes/js/jquery.js"
				type="text/javascript"></script>
			<script src="${contextPath }/themes/js/bootstrap.min.js"
				type="text/javascript"></script>
			<script
				src="${contextPath }/themes/js/google-code-prettify/prettify.js"></script>

			<script src="${contextPath }/themes/js/bootshop.js"></script>
			<script src="${contextPath }/themes/js/jquery.lightbox-0.5.js"></script>

			<span id="themesBtn"></span>
</body>
</html>